﻿<phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:behaviors="clr-namespace:AuchanScan.Interactions"
                            x:Class="AuchanScan.Views.ProductPage" SupportedOrientations="Portrait" Orientation="Portrait" mc:Ignorable="d"
                            DataContext="{Binding Path=MainViewModel,Source={StaticResource ViewModelLocator}}"
                            d:DesignHeight="696" d:DesignWidth="480" shell:SystemTray.IsVisible="True"
							xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/icons/appbar.favs.rest.png" Text="favoris" />
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/icons/appbar.send.text.rest.png"
                                      Text="partager" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <Image Grid.RowSpan="2" Source="../images/Page_Background2.png" Stretch="Fill" />
        <!--TitlePanel contains the name of the application and page title-->

        <!--ContentPanel - place additional content here-->
        <controls:Pivot Title="" VerticalContentAlignment="Stretch" Margin="0,50,0,72" Grid.RowSpan="2" Foreground="Black">
            <controls:PivotItem Header="description">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Image Source="{Binding CurrentProduct.Product.Image1}" d:LayoutOverrides="Width" MaxHeight="150" />
                    <TextBlock Style="{StaticResource PhoneTextLargeStyle}" Text="Nescafé spécial filtre"
                     behaviors:ContinuumAnimation.IsContinuumItem="True"
                     TextWrapping="Wrap"
                     Margin="12,0,12,13" d:LayoutOverrides="Height" Grid.Column="1">
          <i:Interaction.Behaviors>
                            <behaviors:ContinuumDetailBehavior />
                        </i:Interaction.Behaviors>
                    </TextBlock>
                    <TextBlock Text="Grâce à une sélection rigoureuse de ses grains, NESCAFÉ Spécial Filtre est l'équilibre parfait entre la richesse des arômes et la douceur de ses saveurs." VerticalAlignment="Top" Grid.Row="3" Grid.ColumnSpan="2" TextWrapping="Wrap" FontSize="24" Margin="12,0" />
                    <StackPanel Visibility="{Binding HasPromo, Converter={StaticResource VisibilityConverter}}" Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Left"
                      Margin="12,0">
                        <TextBlock Text="promo valable du" Margin="0,0,5,0" Style="{StaticResource PhoneTextSubtleStyle}" />
                        <TextBlock Text="5/03/12" Margin="0,0,5,0" Style="{StaticResource PhoneTextSubtleStyle}" />
                        <TextBlock Text="au" Margin="0,0,5,0" Style="{StaticResource PhoneTextSubtleStyle}" />
                        <TextBlock Text="15/03/12" Margin="0,0,5,0" Style="{StaticResource PhoneTextSubtleStyle}" />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="Informations :" VerticalAlignment="Top" d:LayoutOverrides="Width"
                     Grid.Row="2" Style="{StaticResource PhoneTextTitle2Style}" Grid.ColumnSpan="2" Padding="0,12,0,0" />
                    <TextBlock Style="{StaticResource PhoneTextTitle3Style}" Text="{Binding CurrentProduct.Product.Comment2}" Grid.Row="4"
                     Grid.ColumnSpan="2" />
                    <TextBlock Text="{Binding CurrentProduct.Product.Comment3}" VerticalAlignment="Top" Grid.Row="5" Grid.ColumnSpan="2"
                     Style="{StaticResource PhoneTextSubtleStyle}" />
                    <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Grid.Row="8" d:LayoutOverrides="Height"
                      VerticalAlignment="Bottom">
                        <Grid Margin="0,12" VerticalAlignment="Center">
                            <Rectangle Fill="#FFCFCFD4" Height="50" d:LayoutOverrides="VerticalMargin" />
                            <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
                                <TextBlock Text="3,79" VerticalAlignment="Top"
                           Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="{StaticResource AccentBrushScan}" Margin="12,0,6,0"
                           FontWeight="Bold" />
                                <TextBlock Text="€" VerticalAlignment="Top" Style="{StaticResource PhoneTextExtraLargeStyle}"
                           Foreground="{StaticResource AccentBrushScan}" Margin="0,0,12,0" />
                                <TextBlock Text="au lieu de" VerticalAlignment="Center" Style="{StaticResource PhoneTextLargeStyle}"
                           Margin="6,0" />
                                <TextBlock Text="4,19" VerticalAlignment="Top"
                           Style="{StaticResource PhoneTextExtraLargeStyle}" Margin="12,0,6,0" />
                                <TextBlock Text="€" VerticalAlignment="Top" Style="{StaticResource PhoneTextExtraLargeStyle}"
                           Margin="0,0,12,0" />
                            </StackPanel>
                        </Grid>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,-6,0,12">
                            <TextBlock Text="Cagnotte :" Style="{StaticResource PhoneTextTitle3Style}" Margin="12,0,0,0" />
                            <TextBlock Text="0.30" Style="{StaticResource PhoneTextTitle3Style}" Margin="12,0,0,0" />
                            <TextBlock Text="€" Style="{StaticResource PhoneTextTitle3Style}" Margin="6,0,0,0" />
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem Header="infos">
                <Grid />
            </controls:PivotItem>
            <controls:PivotItem Header="avis">
                <Grid />
            </controls:PivotItem>
        </controls:Pivot>
        <Image Source="../images/Logo.png" HorizontalAlignment="Left" Height="66.5550003051758" MaxHeight="50"
           Margin="24,12,0,-17" />
        <Image Margin="0,0,0,8" Source="/images/herbe.png" VerticalAlignment="Bottom" Grid.Row="1"
           d:LayoutOverrides="VerticalAlignment" />
        <Rectangle Fill="{StaticResource AccentBrushScan}" Height="8" VerticalAlignment="Bottom" Grid.Row="1" />
    </Grid>

</phone:PhoneApplicationPage>